<extend name="Layout:layout_edit" />
<block name="body_content_block">
    <form action="{:AddonU('Task/task_recycling_save')}" method="post" id="frm-export" data-success-fn="reload_page()">
        <table>
            <tr>
                <th>任务名称：</th><td>
                <input type="text" class="easyui-textbox" name="name" value="{$data.name}" />
            </td></tr>
            <tr>
                <th valign="top">号码状态：</th><td>
                    <input type="checkbox" name="state[]" value="0" />未呼<br />
                    <input type="checkbox" name="state[]" value="2" />呼叫失败(拒接)<br />
                    <input type="checkbox" name="state[]" value="3" />应答<br />
                    <input type="checkbox" name="state[]" value="-1" />不限<br />
            </td></tr>
            <tr>
                <th>&nbsp;</th><td>
                <input type="button" value="导出到文件" id="btn-export-file" class="button" /><input type="button" value="导出到新任务" id="btn-export-task" class="button" /></td></tr>
        </table>
        <input type='hidden' value='{$data.id}' name='id' />
        <input type='hidden' value='{$data.taskStrategyID}' name='tsid' />
        <input type='hidden' value='file' name='action' />
    </form>
        <div style="height:90px; overflow-y: auto; line-height: 18px; margin-left: 10px;">
            <foreach name="list" item="vo">
                {$vo.phoneNumber} <span>[{$vo.state|get_channelState_text}]</span><br />
            </foreach>
        </div>
    {$script}
</block>
        <block name="body_after_block">
            <script type="text/javascript">
                item_form.resize_owner_dialog({width:450});
            $('#btn-export-file').click(function(){
                $('input[name="action"]').val('file');
                $('#frm-export').submit();
            })
            $('#btn-export-task').click(function(){
                $('input[name="action"]').val('task');
                $('#frm-export').submit();
            })
        function reload_page(){
            window.parent.window.location.reload();
        }
        </script>
        </block>